package com.elder.business.service.impl;

import java.util.List;
import com.elder.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.elder.business.mapper.ElderlyApartmentActivitiesRecoredsMapper;
import com.elder.business.domain.ElderlyApartmentActivitiesRecoreds;
import com.elder.business.service.IElderlyApartmentActivitiesRecoredsService;

/**
 * 活动记录Service业务层处理
 * 
 * @author zyk
 * @date 2023-11-26
 */
@Service
public class ElderlyApartmentActivitiesRecoredsServiceImpl implements IElderlyApartmentActivitiesRecoredsService 
{
    @Autowired
    private ElderlyApartmentActivitiesRecoredsMapper elderlyApartmentActivitiesRecoredsMapper;

    /**
     * 查询活动记录
     * 
     * @param id 活动记录主键
     * @return 活动记录
     */
    @Override
    public ElderlyApartmentActivitiesRecoreds selectElderlyApartmentActivitiesRecoredsById(Long id)
    {
        return elderlyApartmentActivitiesRecoredsMapper.selectElderlyApartmentActivitiesRecoredsById(id);
    }

    /**
     * 查询活动记录列表
     * 
     * @param elderlyApartmentActivitiesRecoreds 活动记录
     * @return 活动记录
     */
    @Override
    public List<ElderlyApartmentActivitiesRecoreds> selectElderlyApartmentActivitiesRecoredsList(ElderlyApartmentActivitiesRecoreds elderlyApartmentActivitiesRecoreds)
    {
        return elderlyApartmentActivitiesRecoredsMapper.selectElderlyApartmentActivitiesRecoredsList(elderlyApartmentActivitiesRecoreds);
    }

    /**
     * 新增活动记录
     * 
     * @param elderlyApartmentActivitiesRecoreds 活动记录
     * @return 结果
     */
    @Override
    public int insertElderlyApartmentActivitiesRecoreds(ElderlyApartmentActivitiesRecoreds elderlyApartmentActivitiesRecoreds)
    {
        elderlyApartmentActivitiesRecoreds.setCreateTime(DateUtils.getLongTime());
        return elderlyApartmentActivitiesRecoredsMapper.insertElderlyApartmentActivitiesRecoreds(elderlyApartmentActivitiesRecoreds);
    }

    /**
     * 修改活动记录
     * 
     * @param elderlyApartmentActivitiesRecoreds 活动记录
     * @return 结果
     */
    @Override
    public int updateElderlyApartmentActivitiesRecoreds(ElderlyApartmentActivitiesRecoreds elderlyApartmentActivitiesRecoreds)
    {
        elderlyApartmentActivitiesRecoreds.setUpdateTime(DateUtils.getLongTime());
        return elderlyApartmentActivitiesRecoredsMapper.updateElderlyApartmentActivitiesRecoreds(elderlyApartmentActivitiesRecoreds);
    }

    /**
     * 批量删除活动记录
     * 
     * @param ids 需要删除的活动记录主键
     * @return 结果
     */
    @Override
    public int deleteElderlyApartmentActivitiesRecoredsByIds(Long[] ids)
    {
        return elderlyApartmentActivitiesRecoredsMapper.deleteElderlyApartmentActivitiesRecoredsByIds(ids);
    }

    /**
     * 删除活动记录信息
     * 
     * @param id 活动记录主键
     * @return 结果
     */
    @Override
    public int deleteElderlyApartmentActivitiesRecoredsById(Long id)
    {
        return elderlyApartmentActivitiesRecoredsMapper.deleteElderlyApartmentActivitiesRecoredsById(id);
    }
}
